<template>
    <view class="uni-shadow tem u-p-t-10 u-p-b-10 u-flex" @tap.stop="selected" >
        <u-icon v-if="temItem.type==1&&temItem.checked" name="checkmark-circle" color="#21A5F3"></u-icon>
        <u-icon v-if="temItem.type==1&&!temItem.checked" name="checkmark-circle"></u-icon>

        <view :class="[temItem.type==1?'u-m-l-30':'']" style="width:100%" @tap.stop="examineDetail">
            <view v-for="(item,index) in temItem.list" :key="index"
                class="u-flex u-row-between u-font-28 item">
                <text class="uni-gery-color">{{item.title}}</text>
                <text v-if="item.field=='ywzt'" 
                    :class="['font-bold',item.value=='办理中'?'uni-higt-color':'uni-gery-color']">
                    {{item.value}}
                </text>
                <text v-else class="u-line-1" style="max-width:80%">{{item.value}}</text>
            </view>
        </view>
    </view>
</template>

<script>
export default {
    name: 'examineItem',
    title: '审核组件',
    props:{
        tem:{
            type: Object,
            default(){
                return {}
            }
        }
    },
    data(){
        return{
            temItem:{
                type: 1,
                checked: false,
                list:[
                    { field: '', title:'姓名' , value:'' },
                    { field: '', title:'证件号码' , value:'' },
                    { field: '', title:'起始时间' , value:'' },
                    { field: '', title:'终止时间' , value:'' },
                    { field: '', title:'状态' , value:'' },
                ]
            }
        }
    },
    created() {
        // this.temItem = JSON.stringify(this.tem)!='{}'?this.tem:this.temItem
        this.temItem = this.tem
    },


    methods: {
        // 选中与取消
        selected(){
            this.$emit('selectedCancel')
        },
        // 审核详情
        examineDetail(){
            this.$emit('examineDetail')
        }
    },


}
</script>

<style scoped lang="scss">
    .tem{
        background: $uni-text-color-inverse;
        .item{
            border-bottom: 1rpx solid #eee;
            padding: 20rpx 0;
            &:last-child{
                border: none;
            }
        }
    }
</style>